package com;

import javax.swing.*;

/** 图片类 */
public class Images {
//  公开的  静态的  图片数据类型   变量名
    public static ImageIcon  bg; //战舰图片
    public static ImageIcon  heroBird; //战舰图片
    public static ImageIcon  slingshot; //弹弓图片
    public static ImageIcon  wood200; //200长的木头
    public static ImageIcon  wood150; //150长的木头
    public static ImageIcon  wood100; //100长的木头
    public static ImageIcon  pig1; //猪1
    public static ImageIcon  pig2; //猪2
    public static ImageIcon[] bongs;
    static{ //给静态图片赋值
        bg = new ImageIcon("img/bg.png");
        heroBird = new ImageIcon("img/bird.png");
        slingshot = new ImageIcon("img/slingshot.png");
        wood200 =  new ImageIcon("img/wood200.png");
        wood150 =  new ImageIcon("img/wood150.png");
        wood100 =  new ImageIcon("img/wood100.png");
        pig1 =  new ImageIcon("img/pig1.png");
        pig2 =  new ImageIcon("img/pig2.png");

        bongs = new ImageIcon[4];
        bongs[0] =  new ImageIcon("img/bong0.png");
        bongs[1] =  new ImageIcon("img/bong1.png");
        bongs[2] =  new ImageIcon("img/bong2.png");
        bongs[3] =  new ImageIcon("img/bong3.png");
    }

    public static void main(String[] args) {
        System.out.println(heroBird.getImageLoadStatus()); //返回8表示读取成功

    }

}
















